package org.example.lib.aop;


import lombok.Getter;

import java.util.function.Function;

public class Handler {

    private final Function<Object[], Object> function;
    @Getter
    private final Object[] args;

    public Handler(Function<Object[], Object> function, Object[] args){
        this.function = function;
        this.args = args;
    }

    public Object handle() {
        return function.apply(args);
    }
}
